package com.user.im;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.user.mapper.UserMapper;
import com.user.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import com.buchong.pojo.User;

@Service
@Transactional
public class IUservice extends ServiceImpl<UserMapper, User> implements UserService {
    @Autowired
    private UserMapper userMapper;
    @Override
    public User selByName(String name) {
        return userMapper.selectOne(new QueryWrapper<User>().eq("userName",name));
    }

    @Override
    public int putOne(User user) {
        return userMapper.insert(user);
    }
}
